package com.xbongbong.saas.model;

import com.xbongbong.admin.domain.entity.MarketDetailEntity;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;

import java.util.List;

/**
 * @Author: shian
 * @Date: 2020/2/13 13:47
 * @Description:
 */
public interface MarketDetailModel extends IModel<MarketDetailEntity> {
    /**
     * 通过ID找到相应的营销页
     * @param key
     * @return
     * @throws XbbException
     */
    MarketDetailEntity getByKey(Long key) throws XbbException;

    /**
     * 保存营销页
     * @param marketDetailEntity
     * @return
     * @throws XbbException
     */
    int save(MarketDetailEntity marketDetailEntity) throws XbbException;

    /**
     * 发布的营销页
     * @param
     * @return java.util.List<com.xbongbong.admin.domain.entity.MarketDetailEntity>
     * @author 石安
     * @date 2020-02-20
     */
    List<MarketDetailEntity> publishMarket();

    /**
     * 发布的banner营销页
     * @param
     * @return java.util.List<com.xbongbong.admin.domain.entity.MarketDetailEntity>
     * @author youli.chen
     * @date 2020-02-20
     */
    List<MarketDetailEntity> bannerByPublish();

    /**
     * 批量修改
     * @param marketList
     * @throws XbbException
     */
    int batchUpdate(List<MarketDetailEntity> marketList) throws XbbException;
}